﻿<%template _header%>
<%namespace YouHP.Model%>
<%namespace YouHP.Model.Group%>
<%namespace YouHP.Utility%>


<div class="layout-cols2">
	
	<div class="col1">
	<%if IsPost%> <%template _msgbox%> <%else%>
	  <div class="box">  
	  <div class="content">
			<div style=" float:left; padding-top:5px;">
				<div class="pages">
					{PagingString}
				</div>
			</div>
        <div style="float:right;">
        <%csharp%> TempUrl = "/BBS/TopicAdd.aspx?gid=" + GroupData.Id; <%/csharp%>
        <a href="{this.GetUrl(TempUrl)}" ><img src="/support/alpha/images/newtopic.gif" /></a>
        </div>
        <div style="clear:both;"></div>	
        </div> 
     </div>    
<%csharp%>TempUrl = ModuleCtrl.Header4("BBSTopics","帖子列表",false,false); <%/csharp%>
{TempUrl}		

         <form method="post" action="" id="topicdata">  
              <input type="hidden" id="actiontype" name="actiontype" />   
				<table border="0px" cellpadding="0" cellspacing="0" class="topiclist" width="747px">
				<tr style="height:30px;">
				    <td style="padding-left:20px;"><b>标题</b></td>
				    <td align="center"><b>作者</b></td>
				    <td align="center"><b>回复/人气</b></td>
				    <td align="center"><b>最后更新</b></td>
				</tr>
				<tbody>
				<%csharp%>
				string str="color_0";
				foreach(TopicInfo item in TopicDataList) { <%/csharp%>
				<tr style="height:40px" class="{str}">
				   
				    <td>&nbsp;&nbsp;
				    <%csharp%>if(IsModerator()) { <%/csharp%>
				    <input type="checkbox" id="topic{item.Id}" name="topicid" value="{item.Id}"/>
				    <%csharp%>}<%/csharp%>
				    
				    
				     <%csharp%>TempUrl = string.Format("/BBS/Topic.aspx?gid=" + GroupData.Id + "&tid=" + item.Id); <%/csharp%>
				    &nbsp;&nbsp;<a href="{GetUrl(TempUrl)}"><%if item.Title.Length<=20%>{item.Title}<%else%>{item.Title.Substring(0,20)}...<%/if%></a>
				    &nbsp;<%if item.ShowLevel==Constants.TopicGroupTop%><img src="/support/alpha/images/bbsicon2.jpg" /><%/if%>
				          <%if item.ShowLevel==Constants.TopicBest%><img src="/support/alpha/images/is.gif" /><%/if%>
				    
				    
				    </td>
				    <%csharp%>TempUrl = "/Patient/Profile/Index.aspx?id=" + item.PostUserId; <%/csharp%>
				    <td align="center"><a href="{GetUrl(TempUrl)}">{item.PostUserName}</a>
				        <br />{item.PostTime.ToString("yyyy-MM-dd")}</td>
				    <td align="center">{item.ReplyCount}/{item.Hits}</td>
				    <td align="center">
				        <%csharp%>if(item.LatestReplyUserId > 0) { <%/csharp%>
				        <%csharp%>TempUrl = "/Patient/Profile/Index.aspx?id=" + item.LatestReplyUserId; <%/csharp%>
				        <a href="{GetUrl(TempUrl)}" target="_blank"><h style="color:blue;">{item.LatestReplyUserName}</h></a>
				        <br /><%csharp%>TempUrl = item.LatestReplyTime.ToString("yyyy-MM-dd hh:mm") ;<%/csharp%>{TempUrl}
				        <%csharp%>} else{ <%/csharp%>
				         暂无更新
				         <%csharp%>} <%/csharp%>
				    </td>
				</tr>
    			<%csharp%>
    			if(str=="color_0") str="color_1";
					else str="color_0";
    			
    			}<%/csharp%>
				</table>
	     </form>	
				<p style="padding:10px;">&nbsp;&nbsp;<font style="font-weight:bold">管理选中的帖子：</font>&nbsp;&nbsp;
				<a href="javascript:_$('actiontype').value=1;_$('topicdata').submit();" class="selectall">置顶</a>&nbsp;&nbsp;
				<a href="javascript:_$('actiontype').value=2;_$('topicdata').submit();" class="selectall">加精</a>&nbsp;&nbsp;
				<a href="javascript:_$('actiontype').value=3;_$('topicdata').submit();" class="selectall">删除</a></p>		

<%csharp%>TempUrl = ModuleCtrl.Footer("BBSTopics"); <%/csharp%>
{TempUrl}


	  <div class="box">  
	  <div class="content">
			<div style=" float:left; padding-top:5px;">
				<div class="pages">
					{PagingString}
				</div>
			</div>
        <div style="float:right;">
        <%csharp%> TempUrl = "/BBS/TopicAdd.aspx?gid=" + GroupData.Id; <%/csharp%>
        <a href="{this.GetUrl(TempUrl)}" ><img src="/support/alpha/images/newtopic.gif" /></a>
        </div>
        <div style="clear:both;"></div>	
        </div> 
     </div> 

	<%/if%>	
</div>
	
	<div class="col2">


        <%template _ActionLatest%>    
       <%template _GroupHottest%>                   
		
	</div>
	
</div>

<%template _footer%>		
